<%@ page language ="java" contentType="text/html;charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>学生信息</title>
</head>
<body>
<p>欢迎您：${student.stuName}&nbsp;&nbsp;<a href="${pageContext.request.contextPath}/student/quit">退出登录</a></p>
<p align="center" fontsize="5">学生信息管理系统</p>
<table width="100%" border="1" align="center" cellpadding="0" cellspacing="0">
<tr>
<th>学号</th>
<th>姓名</th>
<th>班级</th>
<th>专业</th>
<th>年龄</th>
<th>性别</th>
<th>相关操作</th>
</tr>
<c:forEach var="student" items="${studentList}">
<tr>
<td width ="14%" height="30" align="center" bgcolor="#FFF5D7">${student.stuId}</td>
<td width ="14%" height="30" align="center" bgcolor="#FFF5D7">${student.stuName}</td>
<td width ="14%" height="30" align="center" bgcolor="#FFF5D7">${student.stuClass}</td>
<td width ="14%" height="30" align="center" bgcolor="#FFF5D7">${student.stuSpecial}</td>
<td width ="14%" height="30" align="center" bgcolor="#FFF5D7">${student.stuAge}</td>
<td width ="14%" height="30" align="center" bgcolor="#FFF5D7">${student.stuSex}</td>
<td  height="30" align="center" bgcolor="#FFF5D7">
<a href="${pageContext.request.contextPath}/student/studentUpdate?stuId=${student.stuId}">修改</a>
</td>
<td  height="30" align="center" bgcolor="#FFF5D7">
<a href="${pageContext.request.contextPath}/student/studentDelete?stuId=${student.stuId}" onclick="return confirm_delete()">删除</a>
</td>
</tr>
</c:forEach>
</table>
<h3 align="right">
<a href="${pageContext.request.contextPath}/student/studentAdd">添加学生信息</a>

</a>
</h3>
</body>
<script>
 function confirm_delete(){
 var k = window.confirm("你确定要删除该条记录？");
 if(k){
 return true;
 }else{
 return false}
 }
</script>
</html>